var mysql = require('mysql')

var connection = mysql.createConnection({
    host: '127.0.0.1',
    user: 'root',
    password: 'root',
    database: 'test'
})

connection.connect();

// connection.query('insert into userinfo values("node","node","node","node","node")', function (err, res, fld) {
//     if (err) throw err;
//     console.log('the solution is :', res)
// })

connection.query('select * from userinfo',function(err,res,fld){
    if(err) throw err;
    console.log('the solution is :',res)
})

connection.end();